class People:
    # 构造方法
    def __init__(self, n=None, a=0, w=0):
        self.name = n
        self.age = a
        self.weight = w

    def speak(self):
        print("%s 说：我 %d 岁。" % (self.name, self.age))


# 单继承
class Student(People):
    def __init__(self, n, a, w, g):
        self.name = n
        self.age = a
        self.weight = w
        self.grade = g

    def talk(self):
        print("%s 说：我 %d 岁了，我在读 %d 年级。" % (self.name, self.age, self.grade))


if __name__ == '__main__':
    s = Student("rocket", 8, 60, 3)
    s.speak()
    s.talk()
